﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Yz.Base;
using Yz.Model.Entities;

namespace Yz.DataAccess.DataCache.Interface
{
    public interface IUserCache
    {
        ReturnList<T> GetListByPage<T>(Expression<Func<User, bool>> where = null, ParaPage paraPage = null, List<ParaOrder<User>> orders = null, bool hasTotal = true, bool toUpdate = false) where T : ViewModel;
        Task<ReturnList<T>> GetListByPageAsync<T>(Expression<Func<User, bool>> where = null, ParaPage paraPage = null, List<ParaOrder<User>> orders = null, bool hasTotal = true, bool toUpdate = false) where T : ViewModel;
        Task<ReturnList<T>> GetListByPageAsync<T>(List<Expression<Func<User, bool>>> where = null, ParaPage paraPage = null, List<ParaOrder<User>> orders = null, bool hasTotal = true, bool isOnly = true, bool toUpdate = false) where T : ViewModel;
    }
}
